//package org.example.dingtalkintegrationservice.interceptor;
//
//import com.alibaba.fastjson.JSON;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.stereotype.Component;
//import org.springframework.web.servlet.HandlerInterceptor;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//
//
//
//@Component
//@Slf4j
//public class HttpLogInterceptor implements HandlerInterceptor {
//
//
//    @Override
//    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
//
//
//                log.info("Request URI: {}", request.getRequestURI());
//        log.info("Request Method: {}", request.getMethod());
//        log.info("Request Headers: {}", request.getHeaderNames());
//
////        System.out.println(JSON.toJSONString(request));
//
//        return true;
//    }
//
////    @Override
////    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
////                           org.springframework.web.servlet.ModelAndView modelAndView) {
//////        logger.info("Response Status: {}", response.getStatus());
////    }
////
//    @Override
//    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) {
////        logger.info("Response Body: {}", getResponseBody(response));
//        System.out.println(JSON.toJSONString(response));
//    }
//
//    // Helper methods to read request and response body
////    private String getRequestBody(HttpServletRequest request) {
////        // Implement logic to read request body
////    }
////
////    private String getResponseBody(HttpServletResponse response) {
////        // Implement logic to read response body
////    }
//}
